package com.sjj.springcloud.service;

import com.sjj.springcloud.pojo.Dept;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Service
@FeignClient(value = "SPRINGCLOUD-PROVIDER-DEPT",fallbackFactory = DeptClientServiceFallbackFactory.class)
public interface DeptClientService {

    @RequestMapping("dept/get/{id}")
    public Dept get(@PathVariable("id") Long id);

    @RequestMapping("/dept/getAll")
    public List<Dept> getAll();

    @RequestMapping("/dept/add")
    public boolean add(Dept dept);
}
